import time
def use_time(func):
    def aa(*args, **kwargs):
        start_time = time.time()
        a = func(*args, **kwargs)
        end_time = time.time()
        print('耗时：{:.4f}s'.format(end_time - start_time))
        return(a)
    return(aa)
@use_times
def test_func(a,b):
    time.sleep(a)
    return(a * b)
print(test_func(2,3))